﻿using LdtJudge.DataEngine.CallInterface.CommHelp;
using LdtJudge.DataEngine.Model.DataModel.DataParseStorage;
using System;
using System.Collections.Generic;
using System.Text;

namespace LdtJudge.DataEngine.Data.DataParseStorage
{
    /// <summary>
    /// 分析参数表数据层
    /// </summary>
    public class DAL_An_fengxicanshu
    {
        private IFreeSql FreeSql = FreeSQLHelp.GetFreeSQL("Ldt_DataParseStorage");

        /// <summary>
        /// 添加分析参数
        /// </summary>
        /// <param name="model">分析参数模型</param>
        /// <returns></returns>
        public int Insert(An_fengxicanshu model)
        {
            return FreeSql.Insert<An_fengxicanshu>(model).ExecuteAffrows();
        }

        /// <summary>
        /// 更新分析参数
        /// </summary>
        /// <param name="model">分析参数模型</param>
        /// <returns></returns>
        public int Update(An_fengxicanshu model)
        {
            return FreeSql.Update<An_fengxicanshu>(model).SetSourceIgnore(model, col => col == null).ExecuteAffrows();
        }
    }
}
